package com.myna.csv.StartApp;

import com.myna.csv.csv_file.*;
import com.myna.csv.initial.InitialProcessor;
import com.myna.csv.scan.ScanAllRDCFilesProcesser;
import com.myna.csv.scan.ScanRelationShipPIProcesser;

public class ProcesserStartApp {
    public static void main(String[] args) {
        System.out.println("myna Write RDC Files start");

        //Init
        InitialProcessor initialProcessor = new InitialProcessor();
        initialProcessor.init();

        // write StubISIN csv
        Thread thread = new Thread(new WriteStubISINProcesser());
        thread.start();

        // write UnderlyingPI csv
        Thread thread1 = new Thread(new WriteUnderlyingPIProcesser());
        thread1.start();

        // write BodyGroupPI csv
        Thread thread2 = new Thread(new WriteBodyGroupPIProcesser());
        thread2.start();

        //Scan type = "I"
        ScanAllRDCFilesProcesser allRDCFilesProcesser = new ScanAllRDCFilesProcesser();
        allRDCFilesProcesser.process();

        // write BodyGroup csv
        Thread thread3 = new Thread(new WriteBodyGroupProcesser());
        thread3.start();

        // write Underlying csv
        Thread thread4 = new Thread(new WriteUnderlyingProcesser());
        thread4.start();

        //Scan type = "O" or "Q"
        ScanRelationShipPIProcesser scanRelationShipPIProcesser = new ScanRelationShipPIProcesser();
        scanRelationShipPIProcesser.process();
        System.out.println("myna Write RDC Files end");
    }
}
